//
//  HOMObjCValue.h
//  HigherOrderMessaging
//
//  Created by Ofri Wolfus on 11/28/05.
//  Copyright 2005 Ofri Wolfus. All rights reserved.
//

#import <Foundation/NSInvocation.h>


/*!
 * @header HOMObjCValue
 * HOMObjCValue represents a return value of a method.
 * @copyright Created by Ofri Wolfus on 11/28/05. Copyright 2004-2005 Ofri Wolfus. All rights reserved.
 * @updated 2005-11-28
 * @version 0.1
 */

/*!
 * @class HOMObjCValue
 * @abstract HOMObjCValue represents a return value of a method.
 * @discussion HOMObjCValue is an object wrapper arround the NSObjCValue struct defined in NSInvocation.h.
 * It is used to hold the return value of an invocation in places that can take only objects (like NSArray).
 * Note that if you request for a value from other type of that that the receiver contains, the result is not defined.
 */
@interface HOMObjCValue : NSObject {
	NSObjCValue value;
}

/*!
 * @method valueType
 * @abstract Returns the type of the value that the receiver holds.
 */
- (const char *)valueType;


/*!
 * @method charValue
 * @abstract Returns the <code>char</code> value of the receiver.
 */
- (char)charValue;

/*!
 * @method BOOLValue
 * @abstract Returns the <code>BOOL</code> value of the receiver
 * (which is infact a char and therefor, -BOOLValue is identical to -charValue).
 */
- (BOOL)BOOLValue;

/*!
 * @method shortValue
 * @abstract Returns the <code>short</code> value of the receiver.
 */
- (short)shortValue;

/*!
 * @method longValue
 * @abstract Returns the <code>long</code> value of the receiver.
 */
- (long)longValue;

/*!
 * @method longlongValue
 * @abstract Returns the <code>long long</code> value of the receiver.
 */
- (long long)longlongValue;

/*!
 * @method floatValue
 * @abstract Returns the <code>float</code> value of the receiver.
 */
- (float)floatValue;

/*!
 * @method doubleValue
 * @abstract Returns the <code>double</code> value of the receiver.
 */
- (double)doubleValue;

/*!
 * @method boolValue
 * @abstract Returns the <code>bool</code> value of the receiver.
 */
- (bool)boolValue;

/*!
 * @method selectorValue
 * @abstract Returns the <code>SEL</code> value of the receiver.
 */
- (SEL)selectorValue;

/*!
 * @method objectValue
 * @abstract Returns the <code>id</code> value of the receiver.
 */
- (id)objectValue;

/*!
 * @method pointerValue
 * @abstract Returns the pointer value of the receiver.
 */
- (void *)pointerValue;

/*!
 * @method structLocation
 * @abstract Returns a pointer to the location of the <code>struct</code> value of the receiver.
 */
- (void *)structLocation;

/*!
 * @method cStringLocation
 * @abstract Returns the c string value of the receiver.
 */
- (char *)cStringLocation;

/*!
 * @method intValue
 * @abstract Returns the <code>int</code> value of the receiver.
 */
- (int)intValue;

/*!
 * @method unsignedIntValue
 * @abstract Returns the <code>unsigned int</code> value of the receiver.
 */
- (unsigned int)unsignedIntValue;

@end
